// 这里放 面试题相关的请求
// 比如 获取面试题，获取某个面试题的详细信息，取消点赞 收藏点赞

import request from '@/utils/request'

// 分页获取面试题列表
export const articleListAPI = ({ current, sorter }) => {
  return request({
    method: 'GET',
    url: '/h5/interview/query',
    params: {
      current: current,
      pageSize: 10,
      sorter: sorter
    }
  })
}

// 获取单个面试题详情
export const getArticleDetail = (id) => {
  return request.get('/h5/interview/show', {
    params: {
      id
    }
  })
}

// 点赞，取消点赞，收藏，取消收藏
export const updateLikeAndCollect = (data) => {
  return request.post('/h5/interview/opt', data)
}

// 获取点赞（喜欢）的题目列表
export const likeAndCollectAPI = (params) => {
  return request.get('/h5/interview/opt/list', {
    params: params
  })
}
